Next | Prev | Up | Top | Contents | Index

Using /var/sysgen/Makefile.kernio

The file /var/sysgen/Makefile.kernio is a sample Makefile for compiling kernel modules. You can include it from a Makefile of your own to set the definitions of compiler variables and compiler options appropriately for different CPUs and module types.

The Makefile.kernio file tests the following environment variables:

CPUBOARDSet to the type of CPU used in the target system, for example IP19 or IP22.
COMPILATION_MODELSet to 64 for a 64-bit kernel module, or to 32 for a 32-bit kernel module.

The purpose of the rules in Makefile.kernio is to set compiler variables and compiler options into a Make variable CFLAGS. Other Make variables would be set by your own Makefile.

Note: Makefile.kernio is designed for nonloadable drivers. In particular it sets the compiler option -G8, which is valid for nonloadable drivers. A loadable driver must use -G0.


Next | Prev | Up | Top | Contents | Index